﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<z.m.db.Occasion>" %>

<% if (ViewData["type"] == "header") {%>
	<tr>
		<td><%:Html.LabelFor(m=>m.ID) %></td>
		<td colspan="99">Controll</td>
	</tr>
<%} else if (ViewData["type"] == null) {%>
<tr id="oc<%:Model.ID%>" data-id="<%:Model.ID%>">
	<td>
		<input name="ID" readonly="true" type="text" value="<%:Model.ID %>" />
	</td>
	<td>
		<div class="hidden" data-col="Banner">
			<div class="close" onclick="closePopup(this.parentElement);destroyEditor();"></div>
			<textarea name="Banner"><%:Model.Banner %></textarea>
		</div>
		<input value="Banner" type="button" onclick="showPopup('#oc<%:Model.ID%> div[data-col=\'Banner\']');installEditor('#oc<%:Model.ID%>');" />
	</td>
	<td>
		<input value="Detail" type="button" onclick="
			openPopup('#popup1','<%:Url.Action("Administer", "Occasion_Detail", new {ID=Model.ID })%>');" <%:Model.ID==0?"disabled":"" %>/>
	</td>
	<td>
		<input value="Messenger" type="button" onclick="
	openPopup('#popup1','<%:Url.Action("Administer", "Messenger", new {ID=Model.ID })%>');" <%:Model.ID==0?"disabled":"" %>/>
	</td>
	<td>
		<input type="button" value="<%:Model.ID==0?"Add":"Save" %>" onclick='ajaxTrSubmit(event);'/>
	</td>
	<td>
		<input type="button" value="Delete" onclick='ajaxTrBtn(event,"Delete");' />
	</td>
</tr>
<%}%>